import axios from "axios";

export default {
  getTotalInfo() {
    // 获取首页汇总
    return axios.get("/security/project/totalInfo");
  },
  yearTotalInfo() {
    // 获取年份汇总
    return axios.get("/security/project/yearTotalInfo");
  },
  getProjectList(params) {
    // 获取项目于列表
    return axios.get("/security/project/projectList", { params: params });
  },
  getProjectInfo(projectId) {
    // 获取项目信息
    return axios.get(`/security/project/getProject?projectId=${projectId}`);
  },
  getbusinessmentMembers(projectId) {
    // 获取投委会成员
    return axios.get(
      `/security/project/getbusinessmentMembers?projectId=${projectId}`
    );
  },
  saveProject(params) {
    // 保存项目
    return axios.post("/security/project/saveProject", params);
  },
  updateProject(params) {
    // 修改项目进度信息
    return axios.post("/security/project/updateProject", params);
  },
  savePaymentPlan(params) {
    // 保存打款计划
    return axios.post("/security/project/savePaymentPlan", params);
  },
  getPaymentPlans(projectId) {
    // 获取打款计划
    return axios.get(
      `/security/project/getPaymentPlans?projectId=${projectId}`
    );
  },
  deletePaymentPlan(params) {
    // 删除打款计划
    return axios.post("/security/project/deletePaymentPlan", params);
  },
  addComment(params) {
    // 添加项目评论
    return axios.post("/security/project/addComment", params);
  },
  getComments(params) {
    // 获取评论列表
    return axios.get("/security/project/getComments", { params: params });
  }
};
